#include "TestCheckValidPIN.h"
#include "CardBussiness.h"

CPPUNIT_TEST_SUITE_REGISTRATION(TestCheckValidPIN);

TestCheckValidPIN::TestCheckValidPIN(void)
{
}

TestCheckValidPIN::~TestCheckValidPIN(void)
{
}

void TestCheckValidPIN::TestCheckValidPIN_PINInputIs123_ReturnFalse()
{
    char sPINInput[] = "123";
    char sPINCard[] = "123456";
    CCardBussiness objCardB;
    bool bActualResult = objCardB.CheckValidPIN(sPINInput, sPINCard);
    bool bExpectedResult = false;
    CPPUNIT_ASSERT_EQUAL(bActualResult, bExpectedResult);
}

void TestCheckValidPIN::TestCheckValidPIN_Input_PINCardIs123456_PINInputIs234567_ReturnFalse()
{
    char sPINInput[] = "234567";
    char sPINCard[] = "123456";
    CCardBussiness objCardB;
    bool bActualResult = objCardB.CheckValidPIN(sPINInput, sPINCard);
    bool bExpectedResult = false;
    CPPUNIT_ASSERT_EQUAL(bActualResult, bExpectedResult);
}

void TestCheckValidPIN::TestCheckValidPIN_Input_PINCardIs123456_PINInputIs123456_ReturnTrue()
{
    char sPINInput[] = "123456";
    char sPINCard[] = "123456";
    CCardBussiness objCardB;
    bool bActualResult = objCardB.CheckValidPIN(sPINInput, sPINCard);
    bool bExpectedResult = true;
    CPPUNIT_ASSERT_EQUAL(bActualResult, bExpectedResult);
}